Previously we have laid the foundation for understanding infinite series.
We have seen how to find the sum of an infinite series, and how to determine whether a series converges or diverges using different tests.
Now we will explore some more advanced topics related to infinite series.
The Taylor series is an extremely powerful tool in mathematics, one of the best ways to approximate functions.
It allows for the approximation of a non-polynomial function using a polynomial.
Polynomials are easy to compute, manipulate, differentiate, and integrate, so approximating a function with a polynomial can make it much easier to work with.
To start, consider a function . Assume this is part of some physics problem, and the existence of a term is making the problem difficult to solve.
Let's say we are interested in the value of near , and we want to approximate it with a degree 2 polynomial (a quadratic function).
Denote the quadratic function as . Play around with the sliders below to see how the quadratic function changes as you adjust the coefficients a_0, a_1, and a_2:
Consider how the quadratic function changes as you adjust the coefficients , , and .
The goal is to find the coefficients that make as close as possible to near .
First, consider evaluated at :
We want the value of to be the same as at .
Hence, one of the coefficients is already determined. Changing the other coefficients will affect the function but will not change the value of .
Next, we want the slope of to be the same as the slope of at .
This ensures that the value of is close to not only at but also in the neighborhood of ; it doesn't drift too far away from .
Now, both the position and the slope of are locked as the same as at .
The only thing left is to make sure the concavity of is the same as the concavity of at .
Now we have found the coefficients , , and . The quadratic functoin is then:
The quadratic function is a good approximation of near .
As we add more terms to the polynomial, we can get even closer to the original function. For example, we can add two more terms to get a degree 4 polynomial:
The coefficients and can be determined in a similar way as we did for . We take the third and fourth derivatives of at and set them equal to the corresponding derivatives of at .
Notice what happens when we take the third derivative of the term in :
Notice we are multiplying by by by . This is the same as taking the factorial of :
Recall that we want this to be equal to the third derivative of at . Thus:
And as such, we can solve for :
We get a similar result for :
Thus, the degree 4 polynomial approximation of is:
Notice that adding the higher degree term does not affect the previous terms.
For instance, the concavity of is still the same as the concavity of at .
Why?
When we take the derivative of a term with a higher power of , the power of decreases by one.
The concavity is the second derivative, so the power of decreases by two - so it doesn't become a constant term.
Recall that we set . As such, if there is an term in the polynomial, it will be multiplied by zero, and the term will disappear.
Hence, each individual coefficient is the "control" for a specific order derivative of the function.
For a value of near , the polynomial is a good approximation of .
Next, consider approximating with a polynomial near some value .
Then, the polynomial would be written as:
Instead of , we use as the variable, such that the point is treated like .
This means that if you plug in , things will cancel.
We can keep adding more terms to the polynomial to get a better approximation of near a value of .
The derivatives of follow a pattern of at . As such, the coefficients of the polynomial will follow a similar pattern:
Next, we can generalize this to any function :
And to any value :
We have just derived the Taylor series for any function centered at . This can be written in sigma notation as:
When , this is called the Maclaurin series.
What's interesting is that we only need to know the value of the function and its derivatives at a single point to approximate the function at any other point around it.
Relationship Between Taylor Series and the Fundamental Theorem of Calculus
There's a deep connection between the Taylor series and the Fundamental Theorem of Calculus.
Recall one interpretation of the Fundamental Theorem of Calculus, which is that the derivative of the area under a curve is the curve itself.
Consider the area under the curve of a function from to some variable :
Let the area under the curve be .
Next, consider adding a small change to the variable that increases to :
The total area can be approximated by the blue, green, and red areas.
The blue area is the current area under the curve, .
The green area is a rectangle;
The width is the change in , .
The height is the value of the function at , , which is the slope of the area .
Hence the area of the green rectangle is .
The red area is a small triangle;
The base is the change in , .
The height is the slope of the function at , . Since is the derivative of , this is the second derivative of .
Hence the area of the red triangle is .
The total area is then:
This is equivalent to the Taylor series expansion of centered at :
This shows how interconnected the various concepts in calculus are.
Example Problem: Finding the n-th Maclaurin Polynomial of a Function